<template>
  <svg :class="aaa" aria-hidden="true">
    <use v-bind:xlink:href="iconName | bbb" :fill="iconColor"></use>
  </svg>
</template>

<script>
export default {
  name: "SvgIcon",
  props: ["iconClass", "iconName", "iconColor"],
  computed: {
    aaa() {
      if (this.iconClass) {
        return this.iconClass;
      }
      return "icon";
    },
  },
  filters: {
    bbb(val) {
      return "#" + val;
    },
  },
};
</script>

<style scoped>
.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
</style>
